//
//  File.swift
//  Easy_Car_Treasure_Swift
//
//  Created by 谭鹏 on 2017/6/6.
//  Copyright © 2017年 谭鹏. All rights reserved.
//

import UIKit

extension UIColor{
    
    // MARK: - hexColor
    func hexColor(hexValue:Int,alpha:Float)->UIColor{
        return UIColor.init(colorLiteralRed: (Float((hexValue&0xFF0000)>>16))/255.0, green: (Float((hexValue&0xFF00)>>8))/255.0, blue: (Float(hexValue&0xFF))/255.0, alpha: alpha)
        
        
    }
    // MARK: - rgbColor
    func rgbColor(red:Int,green:Int,blue:Int,alpha:Float)->UIColor{
        return UIColor.init(colorLiteralRed: Float(red)/255.0, green: Float(green)/255.0, blue: Float(blue)/255.0, alpha:alpha)
    }
}
